package com.example.xadmin.common;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class Result<T> implements Serializable {

    private int count;
    private Integer code;
    private String message;
    private List<T> datas;
    private T data;

    public static Result ok(int count, Object data){
        Result result = new Result();
        result.setCode(0);
        result.setCount(count);
        result.setData(data);
        result.setMessage("成功！");
        return result;
    }

}
